Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.3.10, 7.3.0, 7.5.3, 7.6.2, 7.6.6
-
None
-
6.03
-
10
-
Severity 3 - Minor
-
1
-
Description
Summary
Words with some letters used in a group name or issue summary cause internal server error when searching for them using group picker or issue picker.
Environment
- Jira Server - 7.5.3 or 6.3.10 or 7.6.2 (any version of Jira with group/issue picker)
Steps to reproduce
- Go to Administration -> User Management
- Add a group named "SİSTEM"
- Execute REST request http://<JIRA_SERVER_URL>/rest/api/2/groups/picker?query=STEM
Expected result
A list of groups containing 'STEM' symbols are returned in JSON response.
Actual result
The error message is returned "{"errorMessages":["Internal server error"],"errors":{}}" .
The server log shows the following exception stack trace
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 7 at java.lang.String.substring(String.java:1963) at com.atlassian.jira.util.DelimeterInserter.insert(DelimeterInserter.java:294) at com.atlassian.jira.rest.v2.issue.groups.GroupPickerResourceHelperImpl.buildMatchingHtml(GroupPickerResourceHelperImpl.java:146) at com.atlassian.jira.rest.v2.issue.groups.GroupPickerResourceHelperImpl.limitGroupResults(GroupPickerResourceHelperImpl.java:107) at com.atlassian.jira.rest.v2.issue.groups.GroupPickerResourceHelperImpl.findGroupsAsBean(GroupPickerResourceHelperImpl.java:93)
Notes
It will fail with the same error when you create an issue with Summary field having the last word with such symbols and try to search for it in an issue picker (e.g. when linking one issue to another).
The problematic method is DelimeterInserter.insert(String targetString, String[] terms) .
When the length of the targetString when converted to lowercase is greater than the length of the original targetString the issue will appear.
Workaround
A user can modify the problematic group name to add a regular word after the word with problematic symbol. But please note that in this case in the JSON response html field will have slightly incorrect highlighting.
For example if I have a group named BİRİM group and then query for BİRİM it will return the following:
{"header":"Showing 1 of 1 matching groups","total":1,"groups":[{"name":"BİRİM group","html":"<b>BİRİM g</b>roup"}]}
Please note that it highlights "BİRİM g" term instead of just BİRİM inside <b> tags.
Attachments
Issue Links
- is related to
-
JRASERVER-66515 Not able to search for Groups with Special Characters using REST API and from the UI
- Gathering Impact
- mentioned in
-
Page Loading...